<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="pragma" content="no-cache" />
		<meta http-equiv="cache-control" content="no-cache" />
		<meta http-equiv="Expires" content="0" />
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>Insert title here</title>
		<script type="text/javascript">
			// json的定义
			var jsonobj = {
				"key1":12,
				"key2":"abc",
				"key3":true,
				"key4":[11,"arr",false],
				"key5":{
					"key5_1":551,
					"key5_2":"key5_2_value"
				},
				"key6":[{
					"key6_1_1":6611,
					"key6_1_2":"key6_1_2_value"
				},{
					"key6_2_1":6621,
					"key6_2_2":"key6_2_2_value"
				}
				]
			};
			//alert(typeof (jsonobj));//object  json就是一个对象
			// json的访问
			// alert(jsonobj.key1);
			// alert(jsonobj.key2);
			// alert(jsonobj.key3);
			// alert(jsonobj.key4);
			for (var i = 0 ; i<jsonobj.key4.length;i++){
				alert(jsonobj.key4[i]);
			}




			// json对象转字符串
			// json字符串转json对象
		</script>
	</head>
	<body>
		
	</body>
</html>